package com.ytjj.qmyx.mall.enums;

/**
 * @Description TODO
 * @ClassName OrderStatusMessageEnums
 * 
 *
 * @Version 1.0
 **/
public enum OrderPayTypeMessageEnums {

    /**
     * 订单状态：0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->无效订单;6->退款订单
     */

    WAIT_PAY("0", "待付款"),
    WAIT_DELIVERY("1", "待发货"),
    DELIVERY("2", "已发货"),
    FINISH("3", "已完成"),
    CLOSE("4", "已关闭"),
    NO_VALID("5", "无效订单"),
    REFUND("6", "退款订单")
    ;

    /**
     * 状态
     */
    private String status;
    /**
     * 状态描述
     */
    private String statusDesc;

    OrderPayTypeMessageEnums(String status, String statusDesc) {
        this.status = status;
        this.statusDesc = statusDesc;
    }

    public static String getStatusDesc(String status) {
        OrderPayTypeMessageEnums[] values = OrderPayTypeMessageEnums.values();
        for (OrderPayTypeMessageEnums value : values) {
            if(value.status.equals(status)) {
                return value.statusDesc;
            }
        }
        return null;
    }
}
